package com.flower.mapper;

import com.flower.domain.entity.Category;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
* @author 86178
* @description 针对表【category(商品分类表)】的数据库操作Mapper
* @createDate 2025-03-04 12:26:59
* @Entity com.flower.domain.entity.Category
*/
@Mapper
public interface CategoryMapper extends BaseMapper<Category> {

    /**
     * 根据分类ID查询分类名称
     * @param categoryId 分类ID
     * @return 分类名称
     */
    @Select("SELECT category_name FROM category WHERE category_id = #{categoryId}")
    String selectCategoryNameById(@Param("categoryId") Integer categoryId);
}




